package com.cw.controller;


import com.cw.annotation.OperationLogAnno;
import com.cw.common.api.*;
import com.cw.service.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

/**
 * @author smq
 * @since 2021-04-27
 */
@Api(tags = {"床位、病人"})
@RestController
@RequestMapping("/patient-bed")

public class PatientBedController {

    @Autowired
    private IPatientBedService targetService;


    @ApiOperation(value = "床位登记-床位ID、病人ID、病人姓名")
    @PostMapping("/addPatientBed")
    public Response addPatientBed(@RequestParam String bedId, @RequestParam String patientId, @RequestParam String name) {
        return targetService.addPatientBed1(bedId, patientId);
    }


    @ApiOperation(value = "转床-床位ID、病人ID、病人姓名")
    @OperationLogAnno(site = "预约转床", operation = "转床操作", bz = "门诊办人员操作",
            method = "/patient-bed/changePatientBed", type = "UPDATE")
    @PostMapping("/changePatientBed")
    public Response changePatientBed(@RequestParam String bedId, @RequestParam String patientId, @RequestParam String name) {
        return targetService.changePatientBed1(bedId, patientId);
    }

}

